package cn.com.api.mapper.base;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.*;

import cn.com.api.entity.ApiU_user_friend_group_detail;

//DAO
public interface U_user_friend_group_detailMapperBase {

	// 根据id查看
	@Select("SELECT * FROM U_USER_FRIEND_GROUP_DETAIL  WHERE ID = #{id}")
	public ApiU_user_friend_group_detail findU_user_friend_group_detailById(Integer id);

	// 查看数据集
	@Select("SELECT * FROM U_user_friend_group_detail")
	public List<ApiU_user_friend_group_detail> findU_user_friend_group_details();

	// 根据条件查看数据集
	public List<Map<String, Object>> findU_user_friend_group_detailsByMap(HashMap condition);

	// 添加
	@Insert("INSERT INTO U_USER_FRIEND_GROUP_DETAIL (FRIEND_GROUP_ID, FRIEND_ID, ADD_TIME, TYPE) VALUES (#{friend_group_id}, #{friend_id}, #{add_time}, #{type})")
	@Options(useGeneratedKeys = true, keyProperty = "id")
	public int insertU_user_friend_group_detail(ApiU_user_friend_group_detail u_user_friend_group_detail);

	// 修改
	@Update("UPDATE U_USER_FRIEND_GROUP_DETAIL SET FRIEND_GROUP_ID = #{friend_group_id}, FRIEND_ID = #{friend_id}, ADD_TIME = #{add_time}, TYPE = #{type} WHERE ID = #{id}")
	public int updateU_user_friend_group_detail(ApiU_user_friend_group_detail u_user_friend_group_detail);

	// 删除
	@Delete("DELETE FROM U_USER_FRIEND_GROUP_DETAIL  WHERE ID = #{id}")
	public int deleteU_user_friend_group_detail(Integer id);

	// Foreign keys revelant

	// region Indexs revelant

}
